import { FormSchema } from '@/components/Table';
import { bizConfigTypeList } from '@/enums/systemEnum';

export const tableColumns: any = [
  { title: '业务配置名称', dataIndex: 'name' },
  { title: '业务配置类型', dataIndex: 'type' },
  { title: '业务配置值', dataIndex: 'value' },
];
tableColumns.forEach((column: any) => (column.align = 'center'));

export const modalFormSchema: FormSchema[] = [
  {
    required: true,
    label: '业务配置类型',
    field: 'type',
    component: 'Select',
    componentProps: {
      disabled: true,
      options: bizConfigTypeList,
    },
  },
  {
    required: true,
    label: '业务配置值',
    field: 'value',
    component: 'Input',
  },
];

export const selfPickupAddrFormSchema: FormSchema[] = [
  {
    required: true,
    label: '业务配置类型',
    field: 'type',
    component: 'Select',
    componentProps: {
      disabled: true,
      options: bizConfigTypeList,
    },
  },
  {
    field: 'addr',
    label: '地区',
    slot: 'addr',
    required: true,
  },
  {
    required: true,
    field: 'details',
    label: '详细地址',
    component: 'Input',
  },
];
